import request from '@/utils/request'
import { postAction, getAction } from "@/api/index";
import { BASE_SERVICE } from "@/utils/constants";

export const login = data => postAction(`${ BASE_SERVICE }user/login`, data)

// export const getInfo = token => getAction('/vue-element-admin/user/info', data)

export function getInfo( token ) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
